package com.sikaryofficial.backend.domain.dto.req;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.sikaryofficial.backend.annotation.SensitiveDeserializer;
import com.sikaryofficial.backend.domain.vo.store.StoreEvaluateExtObj;
import com.sikaryofficial.system.api.model.att.AttachmentResp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 店铺分享记录请求对象
 *
 * @author qinjinyuan
 * @date 2023-10-30
 */
@Getter
@Setter
@ToString
@ApiModel(value = "店铺分享请求入参", description = "店铺分享请求入参")
public class StoreEvaluateSaveReq {

    /**
     * 分享记录ID
     */
    @ApiModelProperty(value = "分享记录ID", hidden = true)
    private Long shareRecordId;

    /**
     * 分享平台code(微信，QQ等)
     */
    @ApiModelProperty(value = "分享平台code(微信，QQ等)")
    private String platformCode;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String longitude;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String latitude;

    /**
     * 店铺名称
     */
    @ApiModelProperty(value = "店铺名称")
    @NotBlank(message = "storeName cannot be empty")
    private String storeName;

    /**
     * 地址和商品房屋编号
     */
    @ApiModelProperty(value = "详细地址和商品房屋编号")
    @NotBlank(message = "addressDetail cannot be empty")
    private String address;

    @ApiModelProperty(value = "地址ID")
    private Long addressId;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Length(max = 2000, message = "Remarks cannot exceed 2000 characters")
    @JsonDeserialize(using = SensitiveDeserializer.class)
    private String remark;

    /**
     * 数据来源：manual-手工; evaluate-评价
     */
    @ApiModelProperty(value = "数据来源：manual-手工; evaluate-评价")
    private String sourceCode;

    /**
     * 总评分(1~5星正整数)
     */
    @ApiModelProperty(value = "总评分(1~5星正整数)")
    @NotNull(message = "Score cannot be empty ")
    private BigDecimal score;

    @ApiModelProperty(value = "评论图片附件")
    private List<AttachmentResp> attachmentList;

    /**
     * 店铺标签：1:专卖店;2:便利店
     */
    @ApiModelProperty(value = "店铺标签：1:专卖店;2:便利店", example = "1")
    @NotNull(message = "shopType cannot be empty ")
    private Integer shopType;

    /**
     * 店铺是否上架（生效）0-否 1-是; 默认有效
     */
    @ApiModelProperty(value = "店铺是否上架（生效）0-否 1-是; 默认1有效", example = "1")
    private Integer hasEffect;


    /**
     * 国家
     */
    @ApiModelProperty(value = "国家")
    private String country;

    /**
     * 区域
     */
    @ApiModelProperty(value = "区域")
    private String area;

    /**
     * 城市
     */
    @ApiModelProperty(value = "城市")
    private String city;

    /**
     * 区县
     */
    @ApiModelProperty(value = "区县")
    private String county;

    /**
     * 新增扩展需求
     */
    @ApiModelProperty(value = "评价扩展对象")
    @Valid
    private StoreEvaluateExtObj extObj;
}
